home *** CD-ROM | disk | FTP | other *** search
- ////////////////////////////////////////////////////////////////////////////
- //
- // TERMINAL.H - Written by Mike Sax for Dr. Dobb's Journal
- //
- ////////////////////////////////////////////////////////////////////////////
-
- // Screen dimensions and tab-size
- #define ROWS 25
- #define COLUMNS 80
- #define TABSIZE 8
-
- // Custom control messages:
- #define TW_SENDCHAR WM_USER
- #define TW_SENDSTRING (WM_USER + 1)
-
- // Public functions:
- BOOL InitTerminal(HANDLE hInstance);
-
- // Datastructures and types
- typedef struct tagTERMINAL
- {
- int xCursor; // Current cursor column
- int yCursor; // Current cursor row
- int xOffset; // First column shown in the window
- int yOffset; // First row shown in the window
- int cxWindow; // The number of columns that can be displayed
- int cyWindow; // The number of rows that can be displayed
- char achBuffer[ROWS][COLUMNS];
- } TERMINAL;
- typedef TERMINAL _near *NPTERMINAL;
- typedef TERMINAL _far *LPTERMINAL;
- typedef HANDLE HTERMINAL;
-